package com.usian.service;

import com.github.pagehelper.PageInfo;
import com.usian.common.dto.PaperDTO;
import com.usian.common.model.paper.Paper;
import com.usian.common.untils.Result;
import com.usian.common.vo.PaperVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @projectName: 2210A-project1
 * @package: com.usian.service
 * @className: PaperFeignService
 * @author: 莫洪维
 * @email: 1204315800@qq.com
 * @description: TODO
 * @date: 2023/8/24 18:45
 */
@FeignClient("day11Paper")
public interface PaperFeignService {



    /**
     * 查询所有试题方法
     * @param paperId
     * @return
     */
    @RequestMapping(value = "/paper/findQuestions",method = RequestMethod.GET)
    public Result findQuestions(@RequestParam("paperId") Long paperId);

    /**
     * 查询所有试卷方法
     * @return
     */
    @RequestMapping(value = "/paper/list",method = RequestMethod.GET)
    public PageInfo<PaperVO> list(@SpringQueryMap PaperDTO paperDTO);

    /**
     * 根据试卷id查询试题数量
     * @param paperId
     * @return
     */
    @RequestMapping(value = "/paper/paperQuestionsNum",method = RequestMethod.GET)
    public Integer paperQuestionsNum(@RequestParam("paperId") Long paperId);
}
